class Solution {
public:
    int addedInteger(vector<int>& nums1, vector<int>& nums2) {


        int sum1 = 0;
        for (auto& x : nums1)
            sum1 += x;

        int sum2 = 0;
        for (auto& x : nums2)
            sum2 += x;

        int sum = sum2 - sum1;

        int n = nums1.size();

        return sum / n;

    }
};